public class SaleEmployee extends GeneralEmployee{
    static int personsaleamount;//个人销售额
    static double deductrate;//提成

    //构造方法    无参
     public  SaleEmployee(){
}
public SaleEmployee(int num, String name, String sex, int age, String professionaltitle,int personsaleamount,double deductrate){
        this.num=num;                  ////有参构造方法
        this.name=name;
        this.sex=sex;
        this.age=age;
        this.professionaltitle=professionaltitle;
        this.personsaleamount=personsaleamount;
        this.deductrate=deductrate;
}
      //重写实发工资
    public static int Actual_salary(){
        return basicSalary()+(int)(personsaleamount*deductrate);// ==基本+销售额*提成
    }
     //重写显示工资信息
    public static void show(){
        System.out.println("实发工资="+Actual_salary()+"=" +basicSalary()+"("+"职称:" +professionaltitle+")"+"+" +personsaleamount+"("+"销售额"+")"+"*"+deductrate+"提成比例");
    }


    //获取和设置成员变量
    public static int getPersonsaleamount() {
        return personsaleamount;
    }

    public static void setPersonsaleamount(int personsaleamount) {
        SaleEmployee.personsaleamount = personsaleamount;
    }

    public static double getDeductrate() {
        return deductrate;
    }

    public static void setDeductrate(double deductrate) {
        SaleEmployee.deductrate = deductrate;
    }
}
